package com.dragon.mmochat.util;

import com.dragon.mmochat.MmochatConstant;
import com.skymobi.buffer.SkymobiBuffer;
import com.skymobi.message.widget.TLVStructure;

public class CallLocalFuncTlv extends TLVStructure {
	private int funcode = 0;
	private int p1 = 0, p2 = 0, p3 = 0, p4 = 0, p5 = 0, p6 = 0;

	public CallLocalFuncTlv() {
	}

	public CallLocalFuncTlv(int funcode, int p1, int p2, int p3, int p4,
			int p5, int p6) {
		this.funcode = funcode;
		this.p1 = p1;
		this.p2 = p2;
		this.p3 = p3;
		this.p4 = p4;
		this.p5 = p5;
		this.p6 = p6;
	}

	public CallLocalFuncTlv(int funcode, int p1, int p2, int p3, int p4, int p5) {
		this.funcode = funcode;
		this.p1 = p1;
		this.p2 = p2;
		this.p3 = p3;
		this.p4 = p4;
		this.p5 = p5;
	}

	public CallLocalFuncTlv(int funcode, int p1, int p2, int p3, int p4) {
		this.funcode = funcode;
		this.p1 = p1;
		this.p2 = p2;
		this.p3 = p3;
		this.p4 = p4;
	}

	public CallLocalFuncTlv(int funcode, int p1, int p2, int p3) {
		this.funcode = funcode;
		this.p1 = p1;
		this.p2 = p2;
		this.p3 = p3;
	}

	public CallLocalFuncTlv(int funcode, int p1, int p2) {
		this.funcode = funcode;
		this.p1 = p1;
		this.p2 = p2;
	}

	public CallLocalFuncTlv(int funcode, int p1) {
		this.funcode = funcode;
		this.p1 = p1;
	}

	public CallLocalFuncTlv(int funcode) {
		this.funcode = funcode;
	}

	public void setFuncode(int funcode) {
		this.funcode = funcode;
	}

	public void setP1(int p1) {
		this.p1 = p1;
	}

	public void setP2(int p2) {
		this.p2 = p2;
	}

	public void setP3(int p3) {
		this.p3 = p3;
	}

	public void setP4(int p4) {
		this.p4 = p4;
	}

	public void setP5(int p5) {
		this.p5 = p5;
	}

	public void setP6(int p6) {
		this.p6 = p6;
	}

	@Override
	public int getTag() {
		return MmochatConstant.callLocalFuncTlvTag;
	}

	@Override
	public void encodeTLV(SkymobiBuffer out) {
		out.putInt(funcode);
		out.putInt(p1);
		out.putInt(p2);
		out.putInt(p3);
		out.putInt(p4);
		out.putInt(p5);
		out.putInt(p6);
	}
}
